package order.service.controller;

import order.service.model.OrderInfo;
import order.service.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    OrderService orderService;
    @RequestMapping("/{orderId}")
    public OrderInfo getOrderInfoById(@PathVariable("orderId") Integer orderId) {
        return orderService.getOrderInfoById(orderId);
    }
}
